package com.msb.game;

import javax.swing.*;
import java.awt.*;
import java.util.jar.JarEntry;

public class StartGame {

    public static void main(String[] args) {
        //创建窗口
        JFrame jf = new JFrame();
        //标题
        jf.setTitle("小游戏");
        //设置高宽
        int width = Toolkit.getDefaultToolkit().getScreenSize().width;
        int height = Toolkit.getDefaultToolkit().getScreenSize().height;
        jf.setBounds((width-800)/2,(height-800)/2,800,800);
        //窗口不能最大化
        jf.setResizable(false);
        //跟随窗口关闭
        jf.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);

        GamePanel gp = new GamePanel();
            jf.add(gp);

        jf.setVisible(true);
    }
}
